import {Ref} from "vue";

interface OptionActiveReturn {
    optionActive: Ref<number>
    setOptionActive: (v: number) => void
}

export function useOptionActive(raw: number[]): OptionActiveReturn {
    const optionActive = ref(raw[0])

    function setOptionActive(v: number) {
        optionActive.value = v
    }

    return {
        optionActive,
        setOptionActive
    }
}